GXPostScriptSelectPaperType
QuickDraw GX sends theGXPostScriptSelectPaperType
message prior to imaging the page, to select the printer's paper type for the page. You can override theGXPostScriptSelectPaperType
message to do anything you need to do to make sure the device is set up correctly. Your override of theGXPostScriptSelectPaperType
message must match the following formal declaration:
OSErr MyPostScriptSelectPaperType (gxPaperType aPaperType, long pageIndex, gxPostScriptImageDataHandle hImageData);
aPaperType
- The paper-type object that is needed.
pageIndex
- The page number of the page that is about to be imaged.
hImageData
- A handle to the PostScript imaging system structure.
- function result
- An error code. The value
noErr
indicates that the operation was successful.DESCRIPTION
The PostScript generic driver invokes theGXPostScriptSelectPaperType
message when it is setting up the format for a page--after the page has been despooled but before it is imaged. This message selects the paper type for a printer. This message is sent by the default implementation of theGXPostScriptDoPageSetup
message.The default implementation of this message looks for a collection item of type
'post'
in the paper-type collection and sends that to the printer as the paper type for the page. The collection item must be valid PostScript that works for all PostScript devices.You can override this message to customize the way that setting the paper type for the page works.
SPECIAL CONSIDERATIONS
You usually forward theGXPostScriptSelectPaperType
message to other message handlers; however, if you are overriding this message to issue your ownsetpagedevice
operation, do not forward this message.RESULT CODES
The default implementation of the
gxSegmentLoadFailedErr A required code segment could not be found,
or there was not enough memory to load it.gxPrUserAbortErr The user has canceled printing. gxPaperTypeNotFound The specified paper type could not be found. gxNoSuchPTGroup The specified paper type could not be found. GXPostScriptSelectPaperType
message can also return the communications errors that are listed in Table 4-2 on page 4-42.SEE ALSO
The PostScript imaging system structure is described on page 4-26.Paper types and paper-type collection items are described in Inside Macintosh: QuickDraw GX Printing.
Main | Page One | What's New | Apple Computer, Inc. | Find It | Contact Us | Help